home *** CD-ROM | disk | FTP | other *** search
- 10 ! *********************************************************
- 20 ! Example: STRIPCHART (Rescale)
- 30 !
- 40 ! This program builds a STRIPCHART widget. As the chart
- 50 ! scrolls, the vertical scale factor automatically changes
- 60 ! to accomodate the display values.
- 70 !
- 80 ! *********************************************************
- 90 !
- 100 INTEGER I
- 110 REAL D(1:4)
- 120 ASSIGN @Graph TO WIDGET "STRIPCHART"
- 130 CONTROL @Graph;SET ("TITLE":"Example: STRIPCHART (Rescale)")
- 140 CONTROL @Graph;SET ("X":50,"Y":25,"VISIBLE":0)
- 150 CONTROL @Graph;SET ("CURRENT AXIS":"X","ORIGIN":0,"RANGE":4)
- 160 CONTROL @Graph;SET ("NUMBER FORMAT":"MINUTES","DIGITS":9)
- 170 CONTROL @Graph;SET ("CURRENT AXIS":"Y","LOGARITHMIC":1,"ORIGIN":.01)
- 180 CONTROL @Graph;SET ("RANGE":4,"AUTOSCALE":1,"VISIBLE":1)
- 190 CONTROL @Graph;SET ("SYSTEM MENU":"Quit")
- 200 ON EVENT @Graph,"SYSTEM MENU" GOTO Finis
- 210 T=0
- 220 WHILE 1
- 230 T=T+.1
- 240 FOR I=1 TO 4
- 250 D(I)=EXP((-62+25*I+10*SIN(T*I*3)+T*(I-2.5))/12)
- 260 NEXT I
- 270 WAIT .05
- 280 CONTROL @Graph;SET ("POINT LOCATION":T,"VALUES":D(*))
- 290 END WHILE
- 300 Finis:!
- 310 ASSIGN @Graph TO * ! Delete STRIPCHART widget
- 320 END
-